Skip to content

SDSTOR-21465: scrubber phase 1#413

Open
JacksonYao287 wants to merge 1 commit into
eBay:stable/v4.xfrom
JacksonYao287:scrubber-phase-1
Open

SDSTOR-21465: scrubber phase 1#413
JacksonYao287 wants to merge 1 commit into
eBay:stable/v4.xfrom
JacksonYao287:scrubber-phase-1

Conversation

@JacksonYao287
Copy link
Copy Markdown
Collaborator

No description provided.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 7, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 39.21933% with 327 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (stable/v4.x@f604993). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/lib/homestore_backend/hs_http_manager.cpp 0.42% 237 Missing ⚠️
src/lib/homestore_backend/hs_pg_manager.cpp 71.07% 22 Missing and 13 partials ⚠️
src/lib/homestore_backend/hs_http_manager.hpp 0.00% 20 Missing ⚠️
src/lib/homestore_backend/scrub_manager.hpp 72.97% 20 Missing ⚠️
...ib/homestore_backend/replication_state_machine.cpp 64.70% 5 Missing and 1 partial ⚠️
src/lib/homestore_backend/gc_manager.cpp 50.00% 3 Missing and 1 partial ⚠️
src/lib/homestore_backend/MPMCPriorityQueue.hpp 94.59% 1 Missing and 1 partial ⚠️
src/lib/homestore_backend/hs_homeobject.cpp 81.81% 0 Missing and 2 partials ⚠️
src/lib/homestore_backend/hs_shard_manager.cpp 88.88% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@              Coverage Diff               @@
##             stable/v4.x     #413   +/-   ##
==============================================
  Coverage               ?   52.93%           
==============================================
  Files                  ?       39           
  Lines                  ?     6821           
  Branches               ?      931           
==============================================
  Hits                   ?     3611           
  Misses                 ?     2795           
  Partials               ?      415           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JacksonYao287 JacksonYao287 force-pushed the scrubber-phase-1 branch 3 times, most recently from b25a7a3 to 83d0375 Compare May 8, 2026 08:56
"reconcile check: shard {} confirmed absent on peer {}, removing from "
"existence-tracking set",
shard_id, peer_id);
scrub_report->remove_shard_existence_from_peer(shard_id, peer_id);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there may be an iterator invalidation risk here. missing_shards is returned by const reference, so this loop is walking the original map. If remove_shard_existence_from_peer() erases the current shard_id from that same map, the current range-for element / iterator could be invalidated.

Might be safer to iterate over a snapshot copy, or apply removals after the traversal.

Copy link
Copy Markdown
Collaborator Author

@JacksonYao287 JacksonYao287 May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice finding, but after checking the code, seems it is safe.

line 1439, use copy constructor to get a new instance missing_shards (this is just like the snapshot you metioned).

const auto missing_shards = scrub_report->get_missing_shard_ids();

so, actually , the behavior is we iterate on a copied new instance of missing_shards( which is never changed), and the removal happens in the source missing_shards( inside scrub_report). since they are totally different missing_shards, so it`s totally safe.

pls correct me if I am wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants